package com.java.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.java.param.CartListParam;
import com.java.param.OrderParam;
import com.java.param.PageParam;
import com.java.param.ProductIdRemoveParam;
import com.java.pojo.Order;
import com.java.utils.R;
import org.springframework.stereotype.Service;

@Service
public interface OrderService extends IService<Order> {
    /**
     * 保存订单数据
     * @param orderParam
     * @return
     */
    R save(OrderParam orderParam);

    R list(CartListParam cartListParam);

    /**
     * 根据商品id检查所有用户购物车是否有该商品
     * @param productIdRemoveParam
     * @return
     */
    R check(ProductIdRemoveParam productIdRemoveParam);

    /**
     * 分页分组查询订单详情
     * @param pageParam
     * @return
     */
    R adminList(PageParam pageParam);
}
